package lab04.test04;

public class Thread3 implements Runnable{
    int number;
    int count;
    public static void main(String[] args) {
        for(int i=5;i>0;i--)

            new Thread(new Thread3(i)).start();
    }
    public void run() {
        while(true) {
            System.out.println("线程 " + number + ":计数 " + count);
            if(++count== 6) return;
        }
    }
    public Thread3(int num){
        number = num;
        System.out.println("创建线程 " + number);

    }
}
